﻿@model List<ScrumPilot.Domain.Models.Project>
@{
    ViewBag.Title = "ScrumPilot | Projects List";
}
<div id="mainstdcontent">
    <h2>
        Projects List</h2>
    @if (Model != null && Model.Any())
    {
        <div id="projectlist">
            <ul>
                @foreach (var item in Model)
                {
                    <li>
                        <h3>
                            <a href="@Url.Action("Project")/@item.ID">@item.Name</a>
                            @if (item.Selected)
                            { <img alt="follow" src="@Url.Content("~/Content/img/Star.png")" title="You follow this project" />}</h3>
                        <p>
                            Current sprint: <b>@item.CurrentSprint</b></p>
                        <p>
                            @if (item.SubscribeCheckin)
                            {                           
                                <b>This project have a subscription to Checkin events</b>
                            }
                            else
                            {                
                                <text>No subscription to Checkin events</text>           
                            }
                            |
                            @if (item.SubscribeWIChanged)
                            {                           
                                <b>This project have a subscription to WorkItemSimpleForUser changed events</b>
                            }
                            else
                            {                
                                <text>No subscription to WorkItemSimpleForUser changed events</text>           
                            }
                        </p>
                    </li>                
                }
            </ul>
        </div>
    }
    else
    {
        <h3>
            No project listed</h3>
    }
</div>
